﻿package mortal.game.view.copy.groupCopy.view.groupCopyPanel
{
    import Message.Public.*;
    import com.mui.controls.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class GroupCopyRightInfoRender extends GCellRenderer
    {
        private var _playerName:GTextFiled;
        private var _hurt:GTextFiled;
        private var _index:GTextFiled;

        public function GroupCopyRightInfoRender()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatBai.center();
            this._index = UIFactory.gTextField("", 0, 0, 20, 25, this, _loc_1);
            this._playerName = UIFactory.gTextField("", 15, 0, 150, 25, this, _loc_1);
            this._hurt = UIFactory.gTextField("", 120, 0, 100, 25, this, _loc_1);
            this.pushUIToDisposeVec(UIFactory.bg(0, 25, 225, 1, this, ImagesConst.SplitLine));
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            this._playerName.dispose(param1);
            this._playerName = null;
            this._hurt.dispose(param1);
            this._hurt = null;
            this._index.dispose(param1);
            this._index = null;
            super.disposeImpl(param1);
            return;
        }// end function

        private function getColorTxt(param1:String, param2:int) : String
        {
            var _loc_3:String = null;
            switch(param2)
            {
                case 0:
                {
                    _loc_3 = "<font color= \'#fd992f\'>" + param1 + "</font>";
                    break;
                }
                case 1:
                {
                    _loc_3 = "<font color= \'#d618dd\'>" + param1 + "</font>";
                    break;
                }
                case 2:
                {
                    _loc_3 = "<font color= \'#1bbee1\'>" + param1 + "</font>";
                    break;
                }
                default:
                {
                    _loc_3 = param1;
                    break;
                    break;
                }
            }
            return _loc_3;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            var _loc_2:* = param1.data;
            var _loc_3:* = param1.index;
            this._index.htmlText = _loc_2 ? (this.getColorTxt(((_loc_3 + 1)).toString(), _loc_3)) : ("");
            this._playerName.htmlText = _loc_2 ? (this.getColorTxt(_loc_2.username, _loc_3)) : ("");
            this._hurt.htmlText = _loc_2 ? (this.getColorTxt(_loc_2.hurt.toString(), _loc_3)) : ("");
            return;
        }// end function

    }
}
